using CoreManager.Models.DTOs;

namespace CoreManager.Services.Auth
{
    /// <summary>
    /// 认证服务接口
    /// </summary>
    public interface IAuthService
    {
        /// <summary>
        /// 用户登录
        /// </summary>
        /// <param name="loginDto"></param>
        /// <returns></returns>
        Task<LoginResultDto?> LoginAsync(LoginDto loginDto);

        /// <summary>
        /// 刷新令牌
        /// </summary>
        /// <param name="refreshToken"></param>
        /// <returns></returns>
        Task<LoginResultDto?> RefreshTokenAsync(string refreshToken);

        /// <summary>
        /// 用户登出
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<bool> LogoutAsync(int userId);

        /// <summary>
        /// 获取当前用户信息
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<UserInfoDto?> GetCurrentUserAsync(int userId);

        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="oldPassword"></param>
        /// <param name="newPassword"></param>
        /// <returns></returns>
        Task<bool> ChangePasswordAsync(int userId, string oldPassword, string newPassword);
    }
}